{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# pandas I/O"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from pandas import DataFrame, Series"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_clipboard()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>May 2020</th>\n",
       "      <th>May 2019</th>\n",
       "      <th>Change</th>\n",
       "      <th>Programming Language</th>\n",
       "      <th>Ratings</th>\n",
       "      <th>Change.1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>change</td>\n",
       "      <td>C</td>\n",
       "      <td>17.07%</td>\n",
       "      <td>+2.82%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>change</td>\n",
       "      <td>Java</td>\n",
       "      <td>16.28%</td>\n",
       "      <td>+0.28%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>change</td>\n",
       "      <td>Python</td>\n",
       "      <td>9.12%</td>\n",
       "      <td>+1.29%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>change</td>\n",
       "      <td>C++</td>\n",
       "      <td>6.13%</td>\n",
       "      <td>-1.97%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>change</td>\n",
       "      <td>C#</td>\n",
       "      <td>4.29%</td>\n",
       "      <td>+0.30%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>change</td>\n",
       "      <td>Visual Basic</td>\n",
       "      <td>4.18%</td>\n",
       "      <td>-1.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>JavaScript</td>\n",
       "      <td>2.68%</td>\n",
       "      <td>-0.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>change</td>\n",
       "      <td>PHP</td>\n",
       "      <td>2.49%</td>\n",
       "      <td>-0.00%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>change</td>\n",
       "      <td>SQL</td>\n",
       "      <td>2.09%</td>\n",
       "      <td>-0.47%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>21</td>\n",
       "      <td>change</td>\n",
       "      <td>R</td>\n",
       "      <td>1.85%</td>\n",
       "      <td>+0.90%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>18</td>\n",
       "      <td>change</td>\n",
       "      <td>Swift</td>\n",
       "      <td>1.79%</td>\n",
       "      <td>+0.64%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>19</td>\n",
       "      <td>change</td>\n",
       "      <td>Go</td>\n",
       "      <td>1.27%</td>\n",
       "      <td>+0.15%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "      <td>change</td>\n",
       "      <td>MATLAB</td>\n",
       "      <td>1.17%</td>\n",
       "      <td>-0.20%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>10</td>\n",
       "      <td>change</td>\n",
       "      <td>Assembly language</td>\n",
       "      <td>1.12%</td>\n",
       "      <td>-0.69%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Ruby</td>\n",
       "      <td>1.02%</td>\n",
       "      <td>-0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>20</td>\n",
       "      <td>change</td>\n",
       "      <td>PL/SQL</td>\n",
       "      <td>0.99%</td>\n",
       "      <td>-0.03%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>16</td>\n",
       "      <td>change</td>\n",
       "      <td>Classic Visual Basic</td>\n",
       "      <td>0.89%</td>\n",
       "      <td>-0.43%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>13</td>\n",
       "      <td>change</td>\n",
       "      <td>Perl</td>\n",
       "      <td>0.88%</td>\n",
       "      <td>-0.51%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>28</td>\n",
       "      <td>change</td>\n",
       "      <td>Scratch</td>\n",
       "      <td>0.83%</td>\n",
       "      <td>+0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>11</td>\n",
       "      <td>change</td>\n",
       "      <td>Objective-C</td>\n",
       "      <td>0.80%</td>\n",
       "      <td>-0.83%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    May 2020  May 2019  Change  Programming Language Ratings Change.1\n",
       "0          1         2  change                     C  17.07%   +2.82%\n",
       "1          2         1  change                  Java  16.28%   +0.28%\n",
       "2          3         4  change                Python   9.12%   +1.29%\n",
       "3          4         3  change                   C++   6.13%   -1.97%\n",
       "4          5         6  change                    C#   4.29%   +0.30%\n",
       "5          6         5  change          Visual Basic   4.18%   -1.01%\n",
       "6          7         7     NaN            JavaScript   2.68%   -0.01%\n",
       "7          8         9  change                   PHP   2.49%   -0.00%\n",
       "8          9         8  change                   SQL   2.09%   -0.47%\n",
       "9         10        21  change                     R   1.85%   +0.90%\n",
       "10        11        18  change                 Swift   1.79%   +0.64%\n",
       "11        12        19  change                    Go   1.27%   +0.15%\n",
       "12        13        14  change                MATLAB   1.17%   -0.20%\n",
       "13        14        10  change     Assembly language   1.12%   -0.69%\n",
       "14        15        15     NaN                  Ruby   1.02%   -0.32%\n",
       "15        16        20  change                PL/SQL   0.99%   -0.03%\n",
       "16        17        16  change  Classic Visual Basic   0.89%   -0.43%\n",
       "17        18        13  change                  Perl   0.88%   -0.51%\n",
       "18        19        28  change               Scratch   0.83%   +0.32%\n",
       "19        20        11  change           Objective-C   0.80%   -0.83%"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_json('Programming_Language.json')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_html('Programming_Language.html', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_csv('Programming_Language.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "array_1.npy  Numpy_array.ipynb\t     pandas_series.ipynb\r\n",
      "array.csv    Numpy_IO.ipynb\t     Programming_Language.csv\r\n",
      "array.txt    pandas_DataFrame.ipynb  Programming_Language.html\r\n",
      "array_z.npz  Pandas_operation.ipynb  Programming_Language.json\r\n"
     ]
    }
   ],
   "source": [
    "!ls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[    May 2020  May 2019  Change  Programming Language Ratings Change.1\n",
       " 0          1         2  change                     C  17.07%   +2.82%\n",
       " 1          2         1  change                  Java  16.28%   +0.28%\n",
       " 2          3         4  change                Python   9.12%   +1.29%\n",
       " 3          4         3  change                   C++   6.13%   -1.97%\n",
       " 4          5         6  change                    C#   4.29%   +0.30%\n",
       " 5          6         5  change          Visual Basic   4.18%   -1.01%\n",
       " 6          7         7     NaN            JavaScript   2.68%   -0.01%\n",
       " 7          8         9  change                   PHP   2.49%   -0.00%\n",
       " 8          9         8  change                   SQL   2.09%   -0.47%\n",
       " 9         10        21  change                     R   1.85%   +0.90%\n",
       " 10        11        18  change                 Swift   1.79%   +0.64%\n",
       " 11        12        19  change                    Go   1.27%   +0.15%\n",
       " 12        13        14  change                MATLAB   1.17%   -0.20%\n",
       " 13        14        10  change     Assembly language   1.12%   -0.69%\n",
       " 14        15        15     NaN                  Ruby   1.02%   -0.32%\n",
       " 15        16        20  change                PL/SQL   0.99%   -0.03%\n",
       " 16        17        16  change  Classic Visual Basic   0.89%   -0.43%\n",
       " 17        18        13  change                  Perl   0.88%   -0.51%\n",
       " 18        19        28  change               Scratch   0.83%   +0.32%\n",
       " 19        20        11  change           Objective-C   0.80%   -0.83%]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_html('Programming_Language.html')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>May 2020</th>\n",
       "      <th>May 2019</th>\n",
       "      <th>Change</th>\n",
       "      <th>Programming Language</th>\n",
       "      <th>Ratings</th>\n",
       "      <th>Change.1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>change</td>\n",
       "      <td>C</td>\n",
       "      <td>17.07%</td>\n",
       "      <td>+2.82%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>change</td>\n",
       "      <td>Java</td>\n",
       "      <td>16.28%</td>\n",
       "      <td>+0.28%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>change</td>\n",
       "      <td>Python</td>\n",
       "      <td>9.12%</td>\n",
       "      <td>+1.29%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>change</td>\n",
       "      <td>C++</td>\n",
       "      <td>6.13%</td>\n",
       "      <td>-1.97%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>change</td>\n",
       "      <td>C#</td>\n",
       "      <td>4.29%</td>\n",
       "      <td>+0.30%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>change</td>\n",
       "      <td>Visual Basic</td>\n",
       "      <td>4.18%</td>\n",
       "      <td>-1.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>None</td>\n",
       "      <td>JavaScript</td>\n",
       "      <td>2.68%</td>\n",
       "      <td>-0.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>change</td>\n",
       "      <td>PHP</td>\n",
       "      <td>2.49%</td>\n",
       "      <td>-0.00%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>change</td>\n",
       "      <td>SQL</td>\n",
       "      <td>2.09%</td>\n",
       "      <td>-0.47%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>21</td>\n",
       "      <td>change</td>\n",
       "      <td>R</td>\n",
       "      <td>1.85%</td>\n",
       "      <td>+0.90%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>18</td>\n",
       "      <td>change</td>\n",
       "      <td>Swift</td>\n",
       "      <td>1.79%</td>\n",
       "      <td>+0.64%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>19</td>\n",
       "      <td>change</td>\n",
       "      <td>Go</td>\n",
       "      <td>1.27%</td>\n",
       "      <td>+0.15%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "      <td>change</td>\n",
       "      <td>MATLAB</td>\n",
       "      <td>1.17%</td>\n",
       "      <td>-0.20%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>10</td>\n",
       "      <td>change</td>\n",
       "      <td>Assembly language</td>\n",
       "      <td>1.12%</td>\n",
       "      <td>-0.69%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>15</td>\n",
       "      <td>None</td>\n",
       "      <td>Ruby</td>\n",
       "      <td>1.02%</td>\n",
       "      <td>-0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>20</td>\n",
       "      <td>change</td>\n",
       "      <td>PL/SQL</td>\n",
       "      <td>0.99%</td>\n",
       "      <td>-0.03%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>16</td>\n",
       "      <td>change</td>\n",
       "      <td>Classic Visual Basic</td>\n",
       "      <td>0.89%</td>\n",
       "      <td>-0.43%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>13</td>\n",
       "      <td>change</td>\n",
       "      <td>Perl</td>\n",
       "      <td>0.88%</td>\n",
       "      <td>-0.51%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>28</td>\n",
       "      <td>change</td>\n",
       "      <td>Scratch</td>\n",
       "      <td>0.83%</td>\n",
       "      <td>+0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>11</td>\n",
       "      <td>change</td>\n",
       "      <td>Objective-C</td>\n",
       "      <td>0.80%</td>\n",
       "      <td>-0.83%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    May 2020  May 2019  Change  Programming Language Ratings Change.1\n",
       "0          1         2  change                     C  17.07%   +2.82%\n",
       "1          2         1  change                  Java  16.28%   +0.28%\n",
       "2          3         4  change                Python   9.12%   +1.29%\n",
       "3          4         3  change                   C++   6.13%   -1.97%\n",
       "4          5         6  change                    C#   4.29%   +0.30%\n",
       "5          6         5  change          Visual Basic   4.18%   -1.01%\n",
       "6          7         7    None            JavaScript   2.68%   -0.01%\n",
       "7          8         9  change                   PHP   2.49%   -0.00%\n",
       "8          9         8  change                   SQL   2.09%   -0.47%\n",
       "9         10        21  change                     R   1.85%   +0.90%\n",
       "10        11        18  change                 Swift   1.79%   +0.64%\n",
       "11        12        19  change                    Go   1.27%   +0.15%\n",
       "12        13        14  change                MATLAB   1.17%   -0.20%\n",
       "13        14        10  change     Assembly language   1.12%   -0.69%\n",
       "14        15        15    None                  Ruby   1.02%   -0.32%\n",
       "15        16        20  change                PL/SQL   0.99%   -0.03%\n",
       "16        17        16  change  Classic Visual Basic   0.89%   -0.43%\n",
       "17        18        13  change                  Perl   0.88%   -0.51%\n",
       "18        19        28  change               Scratch   0.83%   +0.32%\n",
       "19        20        11  change           Objective-C   0.80%   -0.83%"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_json('Programming_Language.json')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据清理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>May 2020</th>\n",
       "      <th>May 2019</th>\n",
       "      <th>Change</th>\n",
       "      <th>Programming Language</th>\n",
       "      <th>Ratings</th>\n",
       "      <th>Change.1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>change</td>\n",
       "      <td>C</td>\n",
       "      <td>17.07%</td>\n",
       "      <td>+2.82%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>change</td>\n",
       "      <td>Java</td>\n",
       "      <td>16.28%</td>\n",
       "      <td>+0.28%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>change</td>\n",
       "      <td>Python</td>\n",
       "      <td>9.12%</td>\n",
       "      <td>+1.29%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>change</td>\n",
       "      <td>C++</td>\n",
       "      <td>6.13%</td>\n",
       "      <td>-1.97%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>change</td>\n",
       "      <td>C#</td>\n",
       "      <td>4.29%</td>\n",
       "      <td>+0.30%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>change</td>\n",
       "      <td>Visual Basic</td>\n",
       "      <td>4.18%</td>\n",
       "      <td>-1.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>JavaScript</td>\n",
       "      <td>2.68%</td>\n",
       "      <td>-0.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>change</td>\n",
       "      <td>PHP</td>\n",
       "      <td>2.49%</td>\n",
       "      <td>-0.00%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>change</td>\n",
       "      <td>SQL</td>\n",
       "      <td>2.09%</td>\n",
       "      <td>-0.47%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>21</td>\n",
       "      <td>change</td>\n",
       "      <td>R</td>\n",
       "      <td>1.85%</td>\n",
       "      <td>+0.90%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>18</td>\n",
       "      <td>change</td>\n",
       "      <td>Swift</td>\n",
       "      <td>1.79%</td>\n",
       "      <td>+0.64%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>19</td>\n",
       "      <td>change</td>\n",
       "      <td>Go</td>\n",
       "      <td>1.27%</td>\n",
       "      <td>+0.15%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "      <td>change</td>\n",
       "      <td>MATLAB</td>\n",
       "      <td>1.17%</td>\n",
       "      <td>-0.20%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>10</td>\n",
       "      <td>change</td>\n",
       "      <td>Assembly language</td>\n",
       "      <td>1.12%</td>\n",
       "      <td>-0.69%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Ruby</td>\n",
       "      <td>1.02%</td>\n",
       "      <td>-0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>20</td>\n",
       "      <td>change</td>\n",
       "      <td>PL/SQL</td>\n",
       "      <td>0.99%</td>\n",
       "      <td>-0.03%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>16</td>\n",
       "      <td>change</td>\n",
       "      <td>Classic Visual Basic</td>\n",
       "      <td>0.89%</td>\n",
       "      <td>-0.43%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>13</td>\n",
       "      <td>change</td>\n",
       "      <td>Perl</td>\n",
       "      <td>0.88%</td>\n",
       "      <td>-0.51%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>28</td>\n",
       "      <td>change</td>\n",
       "      <td>Scratch</td>\n",
       "      <td>0.83%</td>\n",
       "      <td>+0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>11</td>\n",
       "      <td>change</td>\n",
       "      <td>Objective-C</td>\n",
       "      <td>0.80%</td>\n",
       "      <td>-0.83%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    May 2020  May 2019  Change  Programming Language Ratings Change.1\n",
       "0          1         2  change                     C  17.07%   +2.82%\n",
       "1          2         1  change                  Java  16.28%   +0.28%\n",
       "2          3         4  change                Python   9.12%   +1.29%\n",
       "3          4         3  change                   C++   6.13%   -1.97%\n",
       "4          5         6  change                    C#   4.29%   +0.30%\n",
       "5          6         5  change          Visual Basic   4.18%   -1.01%\n",
       "6          7         7     NaN            JavaScript   2.68%   -0.01%\n",
       "7          8         9  change                   PHP   2.49%   -0.00%\n",
       "8          9         8  change                   SQL   2.09%   -0.47%\n",
       "9         10        21  change                     R   1.85%   +0.90%\n",
       "10        11        18  change                 Swift   1.79%   +0.64%\n",
       "11        12        19  change                    Go   1.27%   +0.15%\n",
       "12        13        14  change                MATLAB   1.17%   -0.20%\n",
       "13        14        10  change     Assembly language   1.12%   -0.69%\n",
       "14        15        15     NaN                  Ruby   1.02%   -0.32%\n",
       "15        16        20  change                PL/SQL   0.99%   -0.03%\n",
       "16        17        16  change  Classic Visual Basic   0.89%   -0.43%\n",
       "17        18        13  change                  Perl   0.88%   -0.51%\n",
       "18        19        28  change               Scratch   0.83%   +0.32%\n",
       "19        20        11  change           Objective-C   0.80%   -0.83%"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>May 2020</th>\n",
       "      <th>May 2019</th>\n",
       "      <th>Change</th>\n",
       "      <th>Programming Language</th>\n",
       "      <th>Ratings</th>\n",
       "      <th>Change.1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>change</td>\n",
       "      <td>C</td>\n",
       "      <td>17.07%</td>\n",
       "      <td>+2.82%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>JavaScript</td>\n",
       "      <td>2.68%</td>\n",
       "      <td>-0.01%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   May 2020  May 2019  Change Programming Language Ratings Change.1\n",
       "0         1         2  change                    C  17.07%   +2.82%\n",
       "6         7         7     NaN           JavaScript   2.68%   -0.01%"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.drop_duplicates('Change')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>May 2020</th>\n",
       "      <th>Change</th>\n",
       "      <th>Programming Language</th>\n",
       "      <th>Ratings</th>\n",
       "      <th>Change.1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>change</td>\n",
       "      <td>C</td>\n",
       "      <td>17.07%</td>\n",
       "      <td>+2.82%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>change</td>\n",
       "      <td>Java</td>\n",
       "      <td>16.28%</td>\n",
       "      <td>+0.28%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>change</td>\n",
       "      <td>Python</td>\n",
       "      <td>9.12%</td>\n",
       "      <td>+1.29%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>change</td>\n",
       "      <td>C++</td>\n",
       "      <td>6.13%</td>\n",
       "      <td>-1.97%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>change</td>\n",
       "      <td>C#</td>\n",
       "      <td>4.29%</td>\n",
       "      <td>+0.30%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>change</td>\n",
       "      <td>Visual Basic</td>\n",
       "      <td>4.18%</td>\n",
       "      <td>-1.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>JavaScript</td>\n",
       "      <td>2.68%</td>\n",
       "      <td>-0.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>change</td>\n",
       "      <td>PHP</td>\n",
       "      <td>2.49%</td>\n",
       "      <td>-0.00%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>change</td>\n",
       "      <td>SQL</td>\n",
       "      <td>2.09%</td>\n",
       "      <td>-0.47%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>change</td>\n",
       "      <td>R</td>\n",
       "      <td>1.85%</td>\n",
       "      <td>+0.90%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>change</td>\n",
       "      <td>Swift</td>\n",
       "      <td>1.79%</td>\n",
       "      <td>+0.64%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>change</td>\n",
       "      <td>Go</td>\n",
       "      <td>1.27%</td>\n",
       "      <td>+0.15%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>change</td>\n",
       "      <td>MATLAB</td>\n",
       "      <td>1.17%</td>\n",
       "      <td>-0.20%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>change</td>\n",
       "      <td>Assembly language</td>\n",
       "      <td>1.12%</td>\n",
       "      <td>-0.69%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Ruby</td>\n",
       "      <td>1.02%</td>\n",
       "      <td>-0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>change</td>\n",
       "      <td>PL/SQL</td>\n",
       "      <td>0.99%</td>\n",
       "      <td>-0.03%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>change</td>\n",
       "      <td>Classic Visual Basic</td>\n",
       "      <td>0.89%</td>\n",
       "      <td>-0.43%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>change</td>\n",
       "      <td>Perl</td>\n",
       "      <td>0.88%</td>\n",
       "      <td>-0.51%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>change</td>\n",
       "      <td>Scratch</td>\n",
       "      <td>0.83%</td>\n",
       "      <td>+0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>change</td>\n",
       "      <td>Objective-C</td>\n",
       "      <td>0.80%</td>\n",
       "      <td>-0.83%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    May 2020  Change  Programming Language Ratings Change.1\n",
       "0          1  change                     C  17.07%   +2.82%\n",
       "1          2  change                  Java  16.28%   +0.28%\n",
       "2          3  change                Python   9.12%   +1.29%\n",
       "3          4  change                   C++   6.13%   -1.97%\n",
       "4          5  change                    C#   4.29%   +0.30%\n",
       "5          6  change          Visual Basic   4.18%   -1.01%\n",
       "6          7     NaN            JavaScript   2.68%   -0.01%\n",
       "7          8  change                   PHP   2.49%   -0.00%\n",
       "8          9  change                   SQL   2.09%   -0.47%\n",
       "9         10  change                     R   1.85%   +0.90%\n",
       "10        11  change                 Swift   1.79%   +0.64%\n",
       "11        12  change                    Go   1.27%   +0.15%\n",
       "12        13  change                MATLAB   1.17%   -0.20%\n",
       "13        14  change     Assembly language   1.12%   -0.69%\n",
       "14        15     NaN                  Ruby   1.02%   -0.32%\n",
       "15        16  change                PL/SQL   0.99%   -0.03%\n",
       "16        17  change  Classic Visual Basic   0.89%   -0.43%\n",
       "17        18  change                  Perl   0.88%   -0.51%\n",
       "18        19  change               Scratch   0.83%   +0.32%\n",
       "19        20  change           Objective-C   0.80%   -0.83%"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.drop(columns='May 2019')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>May 2020</th>\n",
       "      <th>Programming Language</th>\n",
       "      <th>Ratings</th>\n",
       "      <th>Change.1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>C</td>\n",
       "      <td>17.07%</td>\n",
       "      <td>+2.82%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>Java</td>\n",
       "      <td>16.28%</td>\n",
       "      <td>+0.28%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>Python</td>\n",
       "      <td>9.12%</td>\n",
       "      <td>+1.29%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>C++</td>\n",
       "      <td>6.13%</td>\n",
       "      <td>-1.97%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>C#</td>\n",
       "      <td>4.29%</td>\n",
       "      <td>+0.30%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>Visual Basic</td>\n",
       "      <td>4.18%</td>\n",
       "      <td>-1.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>JavaScript</td>\n",
       "      <td>2.68%</td>\n",
       "      <td>-0.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>PHP</td>\n",
       "      <td>2.49%</td>\n",
       "      <td>-0.00%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>SQL</td>\n",
       "      <td>2.09%</td>\n",
       "      <td>-0.47%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>R</td>\n",
       "      <td>1.85%</td>\n",
       "      <td>+0.90%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>Swift</td>\n",
       "      <td>1.79%</td>\n",
       "      <td>+0.64%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>Go</td>\n",
       "      <td>1.27%</td>\n",
       "      <td>+0.15%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>MATLAB</td>\n",
       "      <td>1.17%</td>\n",
       "      <td>-0.20%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>Assembly language</td>\n",
       "      <td>1.12%</td>\n",
       "      <td>-0.69%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>Ruby</td>\n",
       "      <td>1.02%</td>\n",
       "      <td>-0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>PL/SQL</td>\n",
       "      <td>0.99%</td>\n",
       "      <td>-0.03%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>Classic Visual Basic</td>\n",
       "      <td>0.89%</td>\n",
       "      <td>-0.43%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>Perl</td>\n",
       "      <td>0.88%</td>\n",
       "      <td>-0.51%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>Scratch</td>\n",
       "      <td>0.83%</td>\n",
       "      <td>+0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>Objective-C</td>\n",
       "      <td>0.80%</td>\n",
       "      <td>-0.83%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    May 2020  Programming Language Ratings Change.1\n",
       "0          1                     C  17.07%   +2.82%\n",
       "1          2                  Java  16.28%   +0.28%\n",
       "2          3                Python   9.12%   +1.29%\n",
       "3          4                   C++   6.13%   -1.97%\n",
       "4          5                    C#   4.29%   +0.30%\n",
       "5          6          Visual Basic   4.18%   -1.01%\n",
       "6          7            JavaScript   2.68%   -0.01%\n",
       "7          8                   PHP   2.49%   -0.00%\n",
       "8          9                   SQL   2.09%   -0.47%\n",
       "9         10                     R   1.85%   +0.90%\n",
       "10        11                 Swift   1.79%   +0.64%\n",
       "11        12                    Go   1.27%   +0.15%\n",
       "12        13                MATLAB   1.17%   -0.20%\n",
       "13        14     Assembly language   1.12%   -0.69%\n",
       "14        15                  Ruby   1.02%   -0.32%\n",
       "15        16                PL/SQL   0.99%   -0.03%\n",
       "16        17  Classic Visual Basic   0.89%   -0.43%\n",
       "17        18                  Perl   0.88%   -0.51%\n",
       "18        19               Scratch   0.83%   +0.32%\n",
       "19        20           Objective-C   0.80%   -0.83%"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.drop(columns=['May 2019', 'Change'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>May 2020</th>\n",
       "      <th>May 2019</th>\n",
       "      <th>Change</th>\n",
       "      <th>Programming Language</th>\n",
       "      <th>Ratings</th>\n",
       "      <th>Change.1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>change</td>\n",
       "      <td>Python</td>\n",
       "      <td>9.12%</td>\n",
       "      <td>+1.29%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>change</td>\n",
       "      <td>C++</td>\n",
       "      <td>6.13%</td>\n",
       "      <td>-1.97%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>change</td>\n",
       "      <td>C#</td>\n",
       "      <td>4.29%</td>\n",
       "      <td>+0.30%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>change</td>\n",
       "      <td>Visual Basic</td>\n",
       "      <td>4.18%</td>\n",
       "      <td>-1.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>NaN</td>\n",
       "      <td>JavaScript</td>\n",
       "      <td>2.68%</td>\n",
       "      <td>-0.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>change</td>\n",
       "      <td>PHP</td>\n",
       "      <td>2.49%</td>\n",
       "      <td>-0.00%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>8</td>\n",
       "      <td>change</td>\n",
       "      <td>SQL</td>\n",
       "      <td>2.09%</td>\n",
       "      <td>-0.47%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>21</td>\n",
       "      <td>change</td>\n",
       "      <td>R</td>\n",
       "      <td>1.85%</td>\n",
       "      <td>+0.90%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>18</td>\n",
       "      <td>change</td>\n",
       "      <td>Swift</td>\n",
       "      <td>1.79%</td>\n",
       "      <td>+0.64%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>19</td>\n",
       "      <td>change</td>\n",
       "      <td>Go</td>\n",
       "      <td>1.27%</td>\n",
       "      <td>+0.15%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>14</td>\n",
       "      <td>change</td>\n",
       "      <td>MATLAB</td>\n",
       "      <td>1.17%</td>\n",
       "      <td>-0.20%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>10</td>\n",
       "      <td>change</td>\n",
       "      <td>Assembly language</td>\n",
       "      <td>1.12%</td>\n",
       "      <td>-0.69%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Ruby</td>\n",
       "      <td>1.02%</td>\n",
       "      <td>-0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>20</td>\n",
       "      <td>change</td>\n",
       "      <td>PL/SQL</td>\n",
       "      <td>0.99%</td>\n",
       "      <td>-0.03%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>16</td>\n",
       "      <td>change</td>\n",
       "      <td>Classic Visual Basic</td>\n",
       "      <td>0.89%</td>\n",
       "      <td>-0.43%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>13</td>\n",
       "      <td>change</td>\n",
       "      <td>Perl</td>\n",
       "      <td>0.88%</td>\n",
       "      <td>-0.51%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>28</td>\n",
       "      <td>change</td>\n",
       "      <td>Scratch</td>\n",
       "      <td>0.83%</td>\n",
       "      <td>+0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>11</td>\n",
       "      <td>change</td>\n",
       "      <td>Objective-C</td>\n",
       "      <td>0.80%</td>\n",
       "      <td>-0.83%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    May 2020  May 2019  Change  Programming Language Ratings Change.1\n",
       "2          3         4  change                Python   9.12%   +1.29%\n",
       "3          4         3  change                   C++   6.13%   -1.97%\n",
       "4          5         6  change                    C#   4.29%   +0.30%\n",
       "5          6         5  change          Visual Basic   4.18%   -1.01%\n",
       "6          7         7     NaN            JavaScript   2.68%   -0.01%\n",
       "7          8         9  change                   PHP   2.49%   -0.00%\n",
       "8          9         8  change                   SQL   2.09%   -0.47%\n",
       "9         10        21  change                     R   1.85%   +0.90%\n",
       "10        11        18  change                 Swift   1.79%   +0.64%\n",
       "11        12        19  change                    Go   1.27%   +0.15%\n",
       "12        13        14  change                MATLAB   1.17%   -0.20%\n",
       "13        14        10  change     Assembly language   1.12%   -0.69%\n",
       "14        15        15     NaN                  Ruby   1.02%   -0.32%\n",
       "15        16        20  change                PL/SQL   0.99%   -0.03%\n",
       "16        17        16  change  Classic Visual Basic   0.89%   -0.43%\n",
       "17        18        13  change                  Perl   0.88%   -0.51%\n",
       "18        19        28  change               Scratch   0.83%   +0.32%\n",
       "19        20        11  change           Objective-C   0.80%   -0.83%"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.drop(index=[0, 1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>May 2020</th>\n",
       "      <th>May 2019</th>\n",
       "      <th>Change</th>\n",
       "      <th>Programming Language</th>\n",
       "      <th>Ratings</th>\n",
       "      <th>Change.1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-1</td>\n",
       "      <td>2</td>\n",
       "      <td>change</td>\n",
       "      <td>C</td>\n",
       "      <td>17.07%</td>\n",
       "      <td>+2.82%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>change</td>\n",
       "      <td>Java</td>\n",
       "      <td>16.28%</td>\n",
       "      <td>+0.28%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>change</td>\n",
       "      <td>Python</td>\n",
       "      <td>9.12%</td>\n",
       "      <td>+1.29%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>change</td>\n",
       "      <td>C++</td>\n",
       "      <td>6.13%</td>\n",
       "      <td>-1.97%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>change</td>\n",
       "      <td>C#</td>\n",
       "      <td>4.29%</td>\n",
       "      <td>+0.30%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>change</td>\n",
       "      <td>Visual Basic</td>\n",
       "      <td>4.18%</td>\n",
       "      <td>-1.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>None</td>\n",
       "      <td>JavaScript</td>\n",
       "      <td>2.68%</td>\n",
       "      <td>-0.01%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>6</td>\n",
       "      <td>9</td>\n",
       "      <td>change</td>\n",
       "      <td>PHP</td>\n",
       "      <td>2.49%</td>\n",
       "      <td>-0.00%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>change</td>\n",
       "      <td>SQL</td>\n",
       "      <td>2.09%</td>\n",
       "      <td>-0.47%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>8</td>\n",
       "      <td>21</td>\n",
       "      <td>change</td>\n",
       "      <td>R</td>\n",
       "      <td>1.85%</td>\n",
       "      <td>+0.90%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>9</td>\n",
       "      <td>18</td>\n",
       "      <td>change</td>\n",
       "      <td>Swift</td>\n",
       "      <td>1.79%</td>\n",
       "      <td>+0.64%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>10</td>\n",
       "      <td>19</td>\n",
       "      <td>change</td>\n",
       "      <td>Go</td>\n",
       "      <td>1.27%</td>\n",
       "      <td>+0.15%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>11</td>\n",
       "      <td>14</td>\n",
       "      <td>change</td>\n",
       "      <td>MATLAB</td>\n",
       "      <td>1.17%</td>\n",
       "      <td>-0.20%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>12</td>\n",
       "      <td>10</td>\n",
       "      <td>change</td>\n",
       "      <td>Assembly language</td>\n",
       "      <td>1.12%</td>\n",
       "      <td>-0.69%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>13</td>\n",
       "      <td>15</td>\n",
       "      <td>None</td>\n",
       "      <td>Ruby</td>\n",
       "      <td>1.02%</td>\n",
       "      <td>-0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>14</td>\n",
       "      <td>20</td>\n",
       "      <td>change</td>\n",
       "      <td>PL/SQL</td>\n",
       "      <td>0.99%</td>\n",
       "      <td>-0.03%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>15</td>\n",
       "      <td>16</td>\n",
       "      <td>change</td>\n",
       "      <td>Classic Visual Basic</td>\n",
       "      <td>0.89%</td>\n",
       "      <td>-0.43%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "      <td>change</td>\n",
       "      <td>Perl</td>\n",
       "      <td>0.88%</td>\n",
       "      <td>-0.51%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>17</td>\n",
       "      <td>28</td>\n",
       "      <td>change</td>\n",
       "      <td>Scratch</td>\n",
       "      <td>0.83%</td>\n",
       "      <td>+0.32%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>18</td>\n",
       "      <td>11</td>\n",
       "      <td>change</td>\n",
       "      <td>Objective-C</td>\n",
       "      <td>0.80%</td>\n",
       "      <td>-0.83%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    May 2020  May 2019  Change  Programming Language Ratings Change.1\n",
       "0         -1         2  change                     C  17.07%   +2.82%\n",
       "1          0         1  change                  Java  16.28%   +0.28%\n",
       "2          1         4  change                Python   9.12%   +1.29%\n",
       "3          2         3  change                   C++   6.13%   -1.97%\n",
       "4          3         6  change                    C#   4.29%   +0.30%\n",
       "5          4         5  change          Visual Basic   4.18%   -1.01%\n",
       "6          5         7    None            JavaScript   2.68%   -0.01%\n",
       "7          6         9  change                   PHP   2.49%   -0.00%\n",
       "8          7         8  change                   SQL   2.09%   -0.47%\n",
       "9          8        21  change                     R   1.85%   +0.90%\n",
       "10         9        18  change                 Swift   1.79%   +0.64%\n",
       "11        10        19  change                    Go   1.27%   +0.15%\n",
       "12        11        14  change                MATLAB   1.17%   -0.20%\n",
       "13        12        10  change     Assembly language   1.12%   -0.69%\n",
       "14        13        15    None                  Ruby   1.02%   -0.32%\n",
       "15        14        20  change                PL/SQL   0.99%   -0.03%\n",
       "16        15        16  change  Classic Visual Basic   0.89%   -0.43%\n",
       "17        16        13  change                  Perl   0.88%   -0.51%\n",
       "18        17        28  change               Scratch   0.83%   +0.32%\n",
       "19        18        11  change           Objective-C   0.80%   -0.83%"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['May 2020'] = df['May 2020'].apply(lambda x:x-1)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
